package com.ruoyi.supplier.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.TbReportCashMapper;
import com.ruoyi.supplier.domain.TbReportCash;
import com.ruoyi.supplier.service.ITbReportCashService;

/**
 * 每日收入账Service业务层处理
 * 
 * @author oliver.li
 * @date 2021-08-14
 */
@Service
public class TbReportCashServiceImpl implements ITbReportCashService 
{
    @Autowired
    private TbReportCashMapper tbReportCashMapper;

    /**
     * 查询每日收入账
     * 
     * @param id 每日收入账ID
     * @return 每日收入账
     */
    @Override
    public TbReportCash selectTbReportCashById(Long id)
    {
        return tbReportCashMapper.selectTbReportCashById(id);
    }

    /**
     * 查询每日收入账列表
     * 
     * @param tbReportCash 每日收入账
     * @return 每日收入账
     */
    @Override
    public List<TbReportCash> selectTbReportCashList(TbReportCash tbReportCash)
    {
        return tbReportCashMapper.selectTbReportCashList(tbReportCash);
    }

    /**
     * 新增每日收入账
     * 
     * @param tbReportCash 每日收入账
     * @return 结果
     */
    @Override
    public int insertTbReportCash(TbReportCash tbReportCash)
    {
        tbReportCash.setCreateTime(DateUtils.getNowDate());
        return tbReportCashMapper.insertTbReportCash(tbReportCash);
    }

    /**
     * 修改每日收入账
     * 
     * @param tbReportCash 每日收入账
     * @return 结果
     */
    @Override
    public int updateTbReportCash(TbReportCash tbReportCash)
    {
        tbReportCash.setUpdateTime(DateUtils.getNowDate());
        return tbReportCashMapper.updateTbReportCash(tbReportCash);
    }

    /**
     * 批量删除每日收入账
     * 
     * @param ids 需要删除的每日收入账ID
     * @return 结果
     */
    @Override
    public int deleteTbReportCashByIds(Long[] ids)
    {
        return tbReportCashMapper.deleteTbReportCashByIds(ids);
    }

    /**
     * 删除每日收入账信息
     * 
     * @param id 每日收入账ID
     * @return 结果
     */
    @Override
    public int deleteTbReportCashById(Long id)
    {
        return tbReportCashMapper.deleteTbReportCashById(id);
    }
}
